home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / dev / gui / DesignerV1_53.lha / Designer / ShowIconDemo / ShowIconDemo.s < prev    next >
Text File  |  1995-04-28  |  3KB  |  150 lines

  1. ; Compile me to get full executable
  2.  
  3.     include    showicondemowin.i
  4.  
  5. GT_ReplyIMsg             EQU    -78
  6. GT_GetIMsg               EQU    -72
  7. Wait                     EQU    -318
  8. GetMsg                   EQU    -372
  9. ReplyMsg                 EQU    -378
  10. CreateMsgPort            EQU    -666
  11. DeleteMsgPort            EQU    -672
  12. PutStr                   EQU    -948
  13. NameFromLock             EQU    -402
  14.  
  15. start
  16.  
  17.     jsr     OpenLibs
  18.     tst.l   d0
  19.     bne     NoLibs
  20.     movea.l _SysBase,a6
  21.     jsr     CreateMsgPort(a6)
  22.     move.l  d0,AppMsgPort
  23.     tst.l   d0
  24.     beq     NoAppMsgPort
  25.     movea.l AppMsgPort,a2
  26.     movea.l #1,a3
  27.     jsr     OpenWin0Window
  28.     tst.l   d0
  29.     bne     NoWindow
  30.  
  31.     move.l  #0,d0
  32.     movea.l AppMsgPort,a0
  33.     move.b  15(a0),d0
  34.     bset    d0,Signals
  35.     
  36.     move.l  #0,d0
  37.     move.l  #0,d1
  38.     movea.l Win0,a0
  39.     movea.l 86(a0),a0
  40.     move.b  15(a0),d1
  41.     bset    d1,d0
  42.     add.l   d0,Signals
  43.  
  44. WaitHere:
  45.     
  46.     move.l  Signals,d0
  47.     move.l  _SysBase,a6
  48.     jsr     Wait(a6)
  49.  
  50. GetNextIMsg:
  51.     move.l  _GadToolsBase,a6
  52.     movea.l Win0,a0
  53.     movea.l 86(a0),a0
  54.     jsr     GT_GetIMsg(a6)
  55.     tst.l   d0
  56.     beq     NoMoreGTMsgs
  57.     movea.l d0,a1
  58.     move.l  20(a1),d4
  59.     jsr     GT_ReplyIMsg(a6)
  60.  
  61.     cmpi.l  #$200,d4
  62.     beq     Done
  63.     jmp     GetNextIMsg
  64.  
  65. NoMoreGTMsgs:
  66. GetNextAppMsg:
  67.     movea.l _SysBase,a6
  68.     movea.l AppMsgPort,a0
  69.     jsr     GetMsg(a6)
  70.     tst.l   d0
  71.     beq     GotAllAppMsgs
  72.     
  73.     move.l  d0,a3
  74.     
  75.     movea.l _DOSBase,a6
  76.     
  77.     lea     DirStr,a0
  78.     move.l  a0,d1
  79.     jsr     PutStr(a6)
  80.     
  81.     move.l  34(a3),a0
  82.     move.l  (a0),d1
  83.     lea     Buffer,a0
  84.     move.l  a0,d2
  85.     move.l  #250,d3
  86.     jsr     NameFromLock(a6)
  87.     lea     Buffer,a0
  88.     move.l  a0,d1
  89.     jsr     PutStr(a6)
  90.     
  91.     lea     EOL,a0
  92.     move.l  a0,d1
  93.     jsr     PutStr(a6)
  94.     
  95.     lea     FileStr,a0
  96.     move.l  a0,d1
  97.     jsr     PutStr(a6)
  98.     
  99.     move.l  34(a3),a0
  100.     move.l  4(a0),d1
  101.     jsr     PutStr(a6)
  102.     
  103.     lea     EOL,a0
  104.     move.l  a0,d1
  105.     jsr     PutStr(a6)
  106.     
  107.     
  108.     movea.l a3,a1
  109.     movea.l _SysBase,a6
  110.     jsr     ReplyMsg(a6)
  111.     
  112.     jmp     GetNextAppMsg
  113. GotAllAppMsgs:
  114.  
  115.     jmp     WaitHere
  116. Done:
  117.     jsr     CloseWin0Window
  118. NoWindow:
  119.     movea.l _SysBase,a6
  120. ClearNextMsg:
  121.     movea.l AppMsgPort,a0
  122.     jsr     GetMsg(a6)
  123.     tst.l   d0
  124.     beq     ClearedMsgPort
  125.     movea.l d0,a1
  126.     jsr     ReplyMsg(a6)
  127.     bra.s   ClearNextMsg
  128. ClearedMsgPort:
  129.     movea.l AppMsgPort,a0
  130.     jsr     DeleteMsgPort(a6)
  131. NoAppMsgPort:
  132.     jsr     CloseLibs
  133. NoLibs:
  134.     rts
  135.  
  136. AppMsgPort:
  137.     dc.l    0
  138. Signals:
  139.     dc.l    0
  140. DirStr:
  141.     dc.b    'Dir =  ',0
  142. FileStr:
  143.     dc.b    'File = ',0
  144. EOL:
  145.     dc.b    10,0
  146. Buffer:
  147.     ds.b    250
  148.     
  149.     end
  150.